package com.cloud.mall.usr.service;

import com.cloud.mall.base.BaseResponse;
import com.cloud.mall.user.input.UmsMemberReceiveAddressInpDTO;
import com.cloud.mall.user.output.UmsMemberReceiveAddressOut;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(tags = "用户地址管理接口")
@RequestMapping("/member/address")
public interface UmsMemberReceiveAddressService {

    @ApiOperation(value = "添加收货地址")
    @PostMapping("/create")
    BaseResponse create(@RequestBody UmsMemberReceiveAddressInpDTO address);

    @ApiOperation("删除收货地址")
    @PostMapping("/delete/{id}")
    BaseResponse delete(@PathVariable Long id);

    @ApiOperation("修改收货地址")
    @PostMapping("/update/{id}")
    BaseResponse update(@PathVariable Long id, @RequestBody UmsMemberReceiveAddressInpDTO address);

    @ApiOperation("显示所有收货地址")
    @GetMapping("/list")
    BaseResponse<List<UmsMemberReceiveAddressOut>>  list();

    @ApiOperation("显示所有收货地址详情")
    @GetMapping("/{id}")
    BaseResponse<UmsMemberReceiveAddressOut>  getItem(@PathVariable Long id);
}
